@extends('layout.index')


@section('content')
<div class="mws-panel grid_8">
	<div class="mws-panel-header">
    	<span>用户修改</span>
    </div>
    <div class="mws-panel-body no-padding">
		
		<!-- @if(session('error'))
		<div class="mws-form-message error">
        	{{session('error')}}
        </div>
        @endif
 -->

        @if (count($errors) > 0)
		   <div class="mws-form-message error">
		        <ul>
		            @foreach ($errors->all() as $error)
		                <li>{{ $error }}</li>
		            @endforeach
		        </ul>
		    </div>
		@endif

    	<form action="/user/update" method='post' class="mws-form">
    		<div class="mws-form-inline">
    			<div class="mws-form-row">
    				<label class="mws-form-label">用户名:</label>
    				<div class="mws-form-item">
    					<input type="text" name='username' value="{{$row->username}}" placeholder="用户名" class="small">
    				</div>
    			</div>
                <div class="mws-form-row">
                    <label class="mws-form-label">手机号:</label>
                    <div class="mws-form-item">
                        <input type="text" name='phone' value="{{$row->phone}}" placeholder="手机号(仅支持中国大陆)" class="small">
                    </div>
                </div> 
                <div class="mws-form-row">
                    <label class="mws-form-label">状态</label>
                    <div class="mws-form-item clearfix">
                        <ul class="mws-form-list inline">
                            <li><input type="radio" name="status" value="1" {{$row->status==1?'checked':''}}> <label>正常</label></li>
                            <li><input type="radio" name="status" value="0" {{$row->status==0?'checked':''}}> <label>禁止登录</label></li>
                        </ul>
                    </div>
                </div>
                 <div class="mws-form-row">
                    <label class="mws-form-label">会员等级</label>
                    <div class="mws-form-item clearfix">
                        <ul class="mws-form-list inline">
                            <li><input type="radio" name="level" value="0" {{$row->level==0?'checked':''}}> <label>青铜</label></li>
                            <li><input type="radio" name="level" value="1" {{$row->level==1?'checked':''}}> <label>白银</label></li>
                            <li><input type="radio" name="level" value="2" {{$row->level==2?'checked':''}}> <label>黄金</label></li>
                            <li><input type="radio" name="level" value="3" {{$row->level==3?'checked':''}}> <label>白金</label></li>
                            <li><input type="radio" name="level" value="4" {{$row->level==4?'checked':''}}> <label>钻石</label></li>
                            <li><input type="radio" name="level" value="5" {{$row->level==5?'checked':''}}> <label>无敌王者</label></li>
                        </ul>
                    </div>
                </div>
    			 <input type="hidden" name="id" value="{{$row->id}}">		
    		</div>
    		<div class="mws-button-row">
    			{{ csrf_field() }}
    			<input type="submit" class="btn btn-danger" value="提交">
    			<input type="reset" class="btn " value="重置">
    		</div>
    	</form>
    </div>    	
</div>
@endsection